package com.yeebo.enums.config;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * 全局参数名称枚举类
 */
public enum ParamNameEnums {
    DEBUG("DEBUG"),
    UPLOAD_FILE_PATH("UPLOAD_FILE_PATH"),
    COMPRESS_FILE_TYPE("COMPRESS_FILE_TYPE");

    private String key;

    ParamNameEnums(String key) {
        this.key = key;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public static List<Map<String, Object>> toList() {
        List<Map<String, Object>> body = new LinkedList<>();
        for (ParamNameEnums enums : ParamNameEnums.values()) {
            Map<String, Object> entity = new HashMap<>();
            entity.put("key", enums.getKey());
            body.add(entity);
        }
        return body;
    }

}
